package org.hismig.migration;

import java.util.HashMap;
import java.util.Map;

import org.hismig.utils.StringTool;

/**
 * @declare: a runtimes container <br />
 *           This class created by Vansion.Hopihit on 2012-07-04 <br />
 *           <a href="mailto:vansionhopihit@gmail.com">Contact Me</a>
 * @version 1.0
 * @author Vansion.Hopihit
 * 
 */
public class Context {

	public static final String KEY_CURRENTDAY = "CURRENTDAY";

	private Map<String, Object> map;

	public Context() {
		map = new HashMap<String, Object>();
	}

	public Object get(String key) {
		return map.get(key);
	}

	public void set(String key, Object obj) {
		map.put(key, obj);
	}

	public Map<String, Object> getVariableMap() {
		return map;
	}

	public String getParsedVariable(String src) {
		return StringTool.parseString(src, map);
	}
}
